64 #define SLAVE_ADDRESS 0x48
71 WDT_A_hold(WDT_A_BASE);
74 GPIO_setAsPeripheralModuleFunctionInputPin(
80 USCI_B_I2C_initMasterParam
param = {0};
81 param.selectClockSource = USCI_B_I2C_CLOCKSOURCE_SMCLK;
82 param.i2cClk = UCS_getSMCLK();
83 param.dataRate = USCI_B_I2C_SET_DATA_RATE_400KBPS;
84 USCI_B_I2C_initMaster(USCI_B0_BASE, &
param);
87 USCI_B_I2C_setSlaveAddress(USCI_B0_BASE,
92 USCI_B_I2C_setMode(USCI_B0_BASE,
93 USCI_B_I2C_RECEIVE_MODE
97 USCI_B_I2C_enable(USCI_B0_BASE);
100 USCI_B_I2C_clearInterrupt(USCI_B0_BASE,
101 USCI_B_I2C_RECEIVE_INTERRUPT
103 USCI_B_I2C_enableInterrupt(USCI_B0_BASE,
104 USCI_B_I2C_RECEIVE_INTERRUPT
110 USCI_B_I2C_masterReceiveSingleStart(USCI_B0_BASE);
114 __bis_SR_register(LPM0_bits + GIE);
124 #if defined(__TI_COMPILER_VERSION__) || defined(__IAR_SYSTEMS_ICC__)
125 #pragma vector=USCI_B0_VECTOR
127 #elif defined(__GNUC__)
128 __attribute__((interrupt(USCI_B0_VECTOR)))
132 switch (__even_in_range(UCB0IV,12)){
134 case USCI_I2C_UCRXIFG:
MPU_initThreeSegmentsParam param
__bic_SR_register_on_exit(LPM3_bits|GIE)